define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Luckydrawresult,GoPage,$stateParams) {
		
		$scope.act_id = $stateParams.act_id;//接受参数
		$scope.init_data = function() {
			Luckydrawresult.luckydrawresult($scope.act_id, function(data) {
				$scope.winner = data.winner;
			});
		}
		$scope.init_data(); //必须在定义之后
		
	}

	controller.$inject = ['$scope', 'Luckydrawresult','GoPage','$stateParams'];
	
	return app.registerController("luckydrawresultctrl",controller);
});